package com.sh.rbac.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.sh.rbac.core.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 菜单实体类
 *
 * @author lucky
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Menu extends BaseEntity {

    private Long parentId;
    private String menuName;
    private Integer type;
    private String path;
    private String redirect;
    private String component;
    private Integer visible;
    private String perms;
    private String icon;

    @Schema(description = "状态;0-正常,1-停用")
    private Integer status;

    @Schema(description = "优先级")
    private Integer priority;

    @Schema(description = "备注")
    private String remark;

    @TableField(exist = false)
    private Boolean hasChildren;

    @TableField(exist = false)
    private List<Menu> children;

}